<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>亚马逊 - 产品列表</title>
<link type="text/css" rel="stylesheet" href="css/style.css" />
<link type="text/css" rel="stylesheet" href="css/index.css" />
<script type="text/javascript" src="scripts/function.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/jquery-2.1.0.js"></script>
	<script>
		$(function () {
			function DOubleIN(){
				$.post("${pageContext.request.contextPath}/product?param=items",function (data) {
					var dl = $(".clearfix");
					for(var i=0;i<data.list.length;i++){
						var $dt = $("<dt><img style='width: 54px; height: 54px;' src='"+data.list[i].img_source +"' /></dt>");
						var $dd = $("<dd><a href=''>"+data.list[i].name+"</a></dd>");
						$dl.append($dt);
						$dl.append($dd);
					}
				},"json");
			}
		})

	</script>

</head>
<body>
	<%@ include file="index_top.jsp"%>
	<div id="position" class="wrap">
		<c:choose>
			<c:when test="${requestScope.third!=null}">
			您现在的位置：<a href="${pageContext.request.contextPath}/index.jsp">亚马逊</a> &gt; <a
			href="product-list.jsp">${requestScope.third.name}</a> &gt;${requestScope.first.name}
			</c:when>
			<c:otherwise>
				您现在的位置：<a href="${pageContext.request.contextPath}/index.jsp">亚马逊</a> &gt; <a
					href="product-list.jsp">${requestScope.third.name}</a>
			</c:otherwise>
		</c:choose>
    </div>
	<div id="main" class="wrap">
		<div class="lefter">
			<%@ include file="index_product_sort.jsp"%>
			<div class="spacer"></div>
			<div class="last-view">
				<h2>最近浏览</h2>
				<dl class="clearfix">
					<%--<dt>
						<img style="width: 54px; height: 54px;" src="images/product/0.jpg" />
					</dt>
					<dd>
						<a href="#">商品名称</a>
					</dd>
						<c:forEach items="" var="p">
							<dt>
								<img style="width: 54px; height: 54px;" src="" />
							</dt>
							<dd>
								<a href=""></a>
							</dd>
						</c:forEach>
--%>
				</dl>
			</div>
		</div>
		<div class="main">
			<div class="product-list">
				<h2>全部商品</h2>
				<div class="clear" ></div>
				<ul class="product clearfix ">


<c:forEach items="${lists}" var="list">
			<li style="float: left; margin: 10px">
				<dl>
					<dt>
						<a href="${pageContext.request.contextPath}/product?param=shop&id=${list.id}" target="_self"><img src="${list.img_source}" /></a>
					</dt>
					<dd class="title">
						<a href="${pageContext.request.contextPath}/product?param=shop&id=${list.id}" target="_self">${list.name}</a>
					</dd>
					<dd class="price">￥${list.price}</dd>
				</dl>
			</li>
</c:forEach>
		<%--
	</c:when>
	<c:otherwise>
		<c:forEach items="${firstAllList}" var="fir">
			<li style="float: left; margin: 10px">

				<dl>
					<dt>
						<a href="${pageContext.request.contextPath}/product?param=shop&id=${fir.id}" target="_self"><img src="${fir.img_source}" /></a>
					</dt>
					<dd class="title">
						<a href="${pageContext.request.contextPath}/product?param=shop&id=${fir.id}" target="_self">${fir.name}</a>
					</dd>
					<dd class="price">￥${list.price}</dd>
				</dl>
			</li>
		</c:forEach>
	</c:otherwise>
	</c:choose>--%>



				</ul>
				<div class="clear"></div>
				<div class="pager">
					<ul class="clearfix">
						<li><a href="#">上一页</a></li>
						<li>2</li>


						<li><a href="#">3</a></li>


						<li><a href="#">下一页</a></li>
					</ul>
				</div>
			</div>
		</div>
		<div class="clear"></div>
	</div>
	<div id="footer">Copyright &copy; 2018 上海海文 All Rights Reserved.
		京ICP证1000001号</div>
</body>
</html>

